home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Medabots Cardz
/
Medabots CD Cardz Metabee.bin
/
mac
/
assets
/
metabee.dxr
/
00036_Script_36
< prev
next >
Wrap
Text File
|
2001-12-07
|
1KB
|
27 lines
property myFile, squam, startof
global beginscore
on beginsprite me
set the floatPrecision = 0
squam = getOSdirectory()&"\"
if objectP(myFile) then set myFile = 0 --Delete the instance if it already exists
myFile = new(xtra "fileio") -- Create an instance of FileIO
-- openFile(myFile,the moviePath&"info.txt",1) --Open the file with read access
openFile(myFile,squam&"infom.txt",0) --Open the file with read access
myVariable = readFile(myFile) --set the variable 'myVariable' to the text of the file 'info.txt'
if readFile(myFile)=VOID then --checks to see if this file exists
createFile (myFile, squam&"infom.txt")
openFile(myFile,squam&"infom.txt",0)
beginscore = 100
startof = 0
put startof into member("holdscore")
mySaveString = member("holdscore").text
writeString(myFile,mySaveString)
else
beginscore = myVariable
closeFile(myFile) -- Close the file
end if
myFile = 0 -- Dispose of the instance
end